package main

import "net/http"

func main() {
	http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("hello!"))
	})

	http.HandleFunc("/redirect", func(w http.ResponseWriter, r *http.Request) {
		//http.Redirect(w,r,"/hello",200)
		handler := http.RedirectHandler("/hello",200)
		handler.ServeHTTP(w,r)
	})

	http.ListenAndServe("127.0.0.1:8080", nil)
}
